#include <bits/stdc++.h>
using namespace std;
#define it __int128
#define endl '\n'

it n, k;
const it mod1 = 399999959;
const it mod2 = 399999949;
it m[2] = {mod1, mod2};
it a[2] = {};
it M = mod1 * mod2;
it l = 0;

it read(){
    it x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
void write(it x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        write(x / 10);
    putchar(x % 10 + '0');
}

it exgcd(it a,it b,it& x,it& y){
    if(!b){
        x = 1,y = 0;
        return a;
    }
    int d = exgcd(b,a%b,y,x);
    y -= (a / b * x);
    return d;
}

it CRT(){
    it ans = 0;
    for(int i = 0; i < 2; ++ i){
        it Mi = M / m[i];
        it Mi1 = 0;
        exgcd(Mi,m[i],Mi1,l);
        ans += (a[i]*Mi*Mi1);
        ans %= M;
    }return (ans + M) % M;
}

signed main(){
    it T = 0;
    T = read();
    while(T--) {
        cout << "? ";
        write(mod1);
        cout << endl;
        cout.flush();
        a[0] = read();
        cout << "? ";
        write(mod2);
        cout << endl;
        cout.flush();
        a[1] = read();
        cout << "! ";
        write(CRT());
        cout << endl;
    }
    return 0;
}